﻿using LayuiMvc.DataEntity.DataEnum;
using LayuiMvc.Util.EnumUtil;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LayuiMvc.DataModel.Community
{
    public class PostManageModel
    {
        /// <summary>
        /// 帖子Id
        /// </summary>
        public int PostId { get; set; }

        /// <summary>
        /// 帖子标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 帖子类型
        /// </summary>
        public PostTypeEnum PostType { get; set; }

        /// <summary>
        /// 帖子类型
        /// </summary>
        public string PostTypeStr
        {
            get { return EnumExtend.GetDescription(PostType); }
        }

        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime PublishTime { get; set; }

        public string PublishTimeStr
        {
            get { return PublishTime.ToString("yyyy-MM-dd HH:mm"); }
        }

        /// <summary>
        /// 阅读次数
        /// </summary>
        public int ViewCount { get; set; }

        /// <summary>
        /// 回复次数
        /// </summary>
        public int ReplyCount { get; set; }

        /// <summary>
        /// 帖子发布者Id
        /// </summary>
        public int PublishUserId { get; set; }

        /// <summary>
        /// 帖子发布者昵称
        /// </summary>
        public string PublishUserName { get; set; }

        /// <summary>
        /// 是否置顶
        /// </summary>
        public bool IsTop { get; set; }

        /// <summary>
        /// 是否结贴
        /// </summary>
        public bool IsEnd { get; set; }

        /// <summary>
        /// 是否精贴
        /// </summary>
        public bool IsCream { get; set; }
    }
}
